Git | 您所在的位置:网站首页 › windows powershell怎么打开win10 › Git |
前提需求(仅限 Windows)
在可以运行 PowerShell 脚本之前,你需要将本地的 ExecutionPolicy 设置为 RemoteSigned (可以说是允许除了 Undefined 和 Restricted 之外的任何内容)。如果你选择了 AllSigned 而非 RemoteSigned,那么你的本地脚本还需要数字签名后才能执行。如果设置为 RemoteSigned, 那么只有“ZoneIdentifier”设置为 Internet,即从 Web 上下载的脚本才需要签名,其它则不需要。 如果你是管理员,想要为本机上的所有用户设置它,请使用“-Scope LocalMachine”。 如果你是没有管理权限的普通用户,可使用“-Scope CurrentUser”来只为自己设置它。 有关 PowerShell Scopes 的更多详情: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_scopes 有关 PowerShell ExecutionPolicy 的更多详情: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy > Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy RemoteSigned -Force |
CopyRight 2018-2019 实验室设备网 版权所有 |